<html>
<head>
    <script>
        //POST request example:
        //post('URL', {key: 'value'});
        function post(path, params) {
            var method = "post";
            var form = document.createElement("form");
            form.setAttribute("method", method);
            form.setAttribute("action", path);
            form.setAttribute("Referer", "https://xl365.sleepclinic.cn:8084");
            for(var key in params) {
                if(params.hasOwnProperty(key)) {
                    var hiddenField = document.createElement("input");
                    hiddenField.setAttribute("type", "hidden");
                    hiddenField.setAttribute("name", key);
                    hiddenField.setAttribute("value", params[key]);
                    form.appendChild(hiddenField);
                }
            }
            document.body.appendChild(form);
            form.submit();
        }
    
    function actApply(){
        window.webkit.messageHandlers.h5pay.postMessage({methodName:"actApply"});
    }
    
    function actConsult(){
        window.webkit.messageHandlers.h5redirect.postMessage({methodName:"actConsult"});
    }
    
    function payWaySelect(){
        window.webkit.messageHandlers.h5redirect.postMessage({methodName:"payWaySelect"});
    }

    </script>
</head>
<body>
</body>

</html>
